package com.zj.service.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//@Component //将切面类声明为一个bean
//@Aspect //声明这是一个切面类
public class AspectBean {

    @Before(value = "bean(user)")//对容器中名为“user”的bean的方法进行增强，包括toString方法
    public void Before(){
        System.out.println("AspectBean before");
    }
}
